package com.example.service.impl;

import com.example.entity.ShopList;
import com.example.mapper.ShopListMapper;
import com.example.result.CommonResult;
import com.example.service.ShopListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.function.Consumer;

/**
 * @author: tobed
 * @date: 2022/11/20
 * @time: 20:52
 */
@Service
public class ShopListServiceImpl implements ShopListService {

    @Autowired
    ShopListMapper shopListMapper;

    @Override
    public List<ShopList> list() {
        List<ShopList> shopLists = shopListMapper.selectAll();
        shopLists.stream().forEach(new Consumer<ShopList>() {
            @Override
            public void accept(ShopList shopList) {
                System.out.println(shopList);
            }
        });
        return shopLists;
    }
}
